<template>
  <li class="letter_classify_li">
    <h4 class="city_title">
      {{index}} <span>（按字母排序）</span>
    </h4>
    <ul class="groupcity_name_container citylistul">
      <li class="ellipsis" v-for="i in msiteData" :key="i.id" @click="specificCity(i)">{{i.name}}</li>
    </ul>
  </li>
</template>

<script>
export default {
  props: {
    msiteData: {
      type: Array,
      default: []
    },
    index: {
      type: String,
      default: ''
    }
  },
  // 跳转搜索地址
  methods: {
    specificCity(i) {
      window.sessionStorage.setItem('city_id', i.id)
      window.sessionStorage.setItem('city_title', i.name)
      this.$router.push(`/city/${i.id}`)
    }
  }
}
</script>

<style>
</style>